﻿using System;
namespace Codemonk.Pease.Common
{
    /// <summary>
    /// 通讯器
    /// </summary>
    /// <typeparam name="T">可以通讯的数据类型</typeparam>
    public interface ICommunicator<T>
    {
        /// <summary>
        /// 请求数据
        /// </summary>
        /// <param name="data">请求的数据</param>
        /// <param name="server">要请求的服务器</param>
        /// <param name="error">发生错误</param>
        /// <param name="back">返回数据</param>
        void Request(T data, InterfaceServer server, Action<Exception> error, Action<T> back);
    }
}
